package com.service.impl;

import com.mapper.ElectronicFileMapper;
import com.pojo.ElectronicFile;
import com.service.ElectronicFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Mr.Shang
 * @version 1.0
 * @date 2021/9/15 11:38
 * @Description 电子文档服务层接口
 */
@Service
public class ElectronicFileServiceImpl implements ElectronicFileService {
    @Autowired
    private ElectronicFileMapper fileMapper;

    @Override
    public List<ElectronicFile> findAll() {
        return fileMapper.findAll();
    }

    @Override
    public void add(ElectronicFile file) {
         fileMapper.add(file);
    }

    @Override
    public void delete(Integer id) {
        fileMapper.delete(id);
    }

    @Override
    public ElectronicFile findById(Integer id) {
        return fileMapper.findById(id);
    }

    @Override
    public void update(ElectronicFile file) {
        fileMapper.update(file);
    }
}
